<template>
  <Container class="department-manage-list">
    <Split v-model="split">
      <companySelectItem
        slot="left" 
        class="mr"
        @confirmSelect='onConfirmSelect'
        @update='onUpdate'
      />
      <departmentTreeItem
        slot="right"
        ref="departmentTreeItem"
      />
    </Split>
  </Container>
</template>
<script>
import { guid } from '@/util';
import departmentTreeItem from './edit/departmentTreeItem';
import companySelectItem from './edit/companySelectItem';
export default {
  components: {
    departmentTreeItem,companySelectItem
  },
  data() {
    return {
      tab: 'tab1',
      split: 0.7,
      curClickNode: null,
      selectCompany: [],
    }
  },
  methods: {
    onUpdate() {
      this.$refs.departmentTreeItem.refersh()
    },
    onChangeCurClickNode(data) {
      this.curClickNode = data;
    },
    onConfirmSelect(arr) {
      this.selectCompany = arr;
      this.$refs.departmentTreeItem.selectCompany(arr);
    },
  }
}
</script>
